package com.rbs.mapper;

import com.rbs.entity.Tea;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface TeaMapper {
    //查询所有
    List<Tea> selectAllTeaAndCategory();
    //根据id查询
    Tea selectTeaAndCategoryById(int id);
    //删除
    void deleteTeaById(int id);
    //修改
    void updateTea(Tea tea);
    //批量删除
    void deleteMany(int[] ids);
    //添加
    void insertTeaAndCategory(Tea tea);
    //根据外键id进行删除
    void deleteTeaByCateId(int cateId);
    //
    List<Tea> selectAllTeaAndCategoryByCategory(String categoryName);
    //模糊和精确查询
    List<Tea> selectByPage(@Param("name") String name, @Param("price") BigDecimal price);
}
